﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.CMS263.PO;
using Com.CMS263.BLL;
using Com.CMS263.Util;

namespace Com.CMS263.Web.manage.UserManager
{
    public partial class user_action : System.Web.UI.Page
    {
        CustomerListBLL cusBll = new CustomerListBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            string op=Request["op"];
            if (op=="delUser")
            {
                int id = int.Parse(Request["id"]);
                if (delUser(id))
                {
                    Response.Write("ok");
                }
                else
                {
                    Response.Write("no");
                }
            }
        }
        public bool delUser( int id){
            cusBll.cus = (CustomerList)cusBll.FindModelById("CustomerList", id);
            if (cusBll.Delete())
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
